Interface com.symantec.itools.vcafe.openapi.SourceFileListener
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.symantec.itools.vcafe.openapi.SourceFileListener

public interface SourceFileListener
The listener interface for receiving notification when a change has occurred to a SourceFile. To be notified of changes, a plug-in implements this interface then calls SourceFile.addSourceFileListener to place itself on the notification list. When the SourceFile changes, the appropriate method of this interface is called. To be notified of changes to any SourceFile, use VisualCafe.addSourceFileListener. If you are only interested in a subset of the notification methods, you can extend the SourceFileAdapter class rather than implement all the methods yourself.

Version:
1.0
Author:
Symantec Internet Tools Division
Since:
VCafe 3.0
See Also:
addSourceFileListener, removeSourceFileListener, addSourceFileListener, removeSourceFileListener, SourceFileAdapter

Variable Index

 o CHANGED_BY_USER
Indicates the file was modified by the user.
 o CHANGED_SYMBOLICALLY
Indicates the file was modified by the parser.

Method Index

 o aboutToSaveSourceFile(SourceFile)
This method is called when the file is about to be saved to disk.
 o doneSavingSourceFile(SourceFile)
This method is called when the file is done being saved to the disk.
 o sourceFileChangeUndone(SourceFile)
This method is called when a change to the file is Undone.
 o sourceFileChanged(SourceFile, int)
This method is called when the file was modified since being loaded from disk.
 o sourceFileReverted(SourceFile)
This method is called when the file's contents have been reverted.

Variables

 o CHANGED_BY_USER
public static final int CHANGED_BY_USER
Indicates the file was modified by the user.

 o CHANGED_SYMBOLICALLY
public static final int CHANGED_SYMBOLICALLY
Indicates the file was modified by the parser.

Methods

 o aboutToSaveSourceFile
public abstract void aboutToSaveSourceFile(SourceFile sourceFile)
This method is called when the file is about to be saved to disk.

Parameters:
sourceFile - the file that is about to be saved.
 o doneSavingSourceFile
public abstract void doneSavingSourceFile(SourceFile sourceFile)
This method is called when the file is done being saved to the disk.

Parameters:
sourceFile - the file that was just saved.
 o sourceFileChangeUndone
public abstract void sourceFileChangeUndone(SourceFile sourceFile)
This method is called when a change to the file is Undone.

 o sourceFileChanged
public abstract void sourceFileChanged(SourceFile sourceFile,
                                       int reason)
This method is called when the file was modified since being loaded from disk. Note that this method is not called for every keystroke, just the initial change.

Parameters:
sourceFile - the file that has been modified.
reason - how the file was modified. Can be one of:
  • CHANGED_BY_USER - the file was modified by the user.
  • CHANGED_SYMBOLICALLY - the file was modified by the parser.
 o sourceFileReverted
public abstract void sourceFileReverted(SourceFile sourceFile)
This method is called when the file's contents have been reverted.

Parameters:
sourceFile - the file whose contents have been reverted.

All Packages  Class Hierarchy  This Package  Previous  Next  Index